<?php

/*
 * @author Ebrain Cedeno <ebraincedeno@gmail.com>
 */

class client extends ActiveRecord{
    
    public function __construct($name = __CLASS__) {
        parent::__construct($name);
        $this->labels = array("business_name"=>"Nombre",
                              "address"=>"Direccion",
                              "phone"=>"Telefono",
                              "phone_mobile"=>"Celular",
                              "e_mail"=>"Correo");
        
        $this->rules[]=array("phone"=>"integer");
        $this->rules[]=array("phone_mobile"=>"integer");
        $this->rules[]=array("e_mail"=>"email");       
    }
    
    public static function model(){
        return new self;
    }
    
    public function search(){
        unset($this->_columns[array_search("active", $this->_columns)]);
        parent::search();
        
    }
    
}
?>
